home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWFiles / SLFilRep.xih < prev   
Encoding:
Text File  |  1996-09-16  |  10.8 KB  |  412 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: SLFilRep.xih.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxih.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *     File:                SLFilRep.idl
  13.  * 
  14.  *     Contains:            Interface for FW_OFile class
  15.  *     Release Version:    $ ODF 2 $
  16.  * 
  17.  *     Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  18.  * 
  19.  */
  20.  
  21.  
  22. #ifndef SOM_FW_OFile_xih
  23. #define SOM_FW_OFile_xih
  24.  
  25. #include <somcls.xh>
  26. #include <somcm.xh>
  27.  
  28. /*
  29.  * Passthru lines: File: "C.xih", "before"
  30.  */
  31. class FW_CPrivFileRep;
  32.  
  33. #ifndef SOM_FW_OFile_xh
  34. #include <SLFilRep.xh>
  35. #endif
  36.  
  37. /*
  38.  * Set the scope of methods functions
  39.  */
  40. #ifndef SOM_Scope
  41. #define SOM_Scope extern "C"
  42. #endif
  43.  
  44. #define FW_OFile_MaxNoMethods 13
  45.  
  46. /*
  47.  * -- Instance Data
  48.  */
  49.  
  50. /*
  51.  * -- Use best possible alignment for instance data slice.
  52.  */
  53. #if PRAGMA_ALIGN_SUPPORTED
  54. #  pragma options align=power
  55. #endif
  56. typedef struct FW_OFileData {
  57.     FW_CPrivFileRep* fRep;
  58. } FW_OFileData;
  59. #if PRAGMA_ALIGN_SUPPORTED
  60. #  pragma options align=reset
  61. #endif
  62.  
  63. /*
  64.  * -- Getdata Macro
  65.  */
  66.  
  67. /*
  68.  * -- This emitter treats Data Tokens as Thunks by default.
  69.  * -- Use the sc modifier "nothunks" to override this default.
  70.  */
  71. SOMEXTERN typedef FW_OFileData* (* SOMLINK somTD_FW_OFile_DataThunk)(void*);
  72. #define FW_OFileGetData(somSelf) \
  73.    (((somTD_FW_OFile_DataThunk)(FW_OFileClassData.instanceDataToken))(somSelf))
  74.  
  75. /*
  76.  * -- Instance Data Access Macros for use in Method Procedures
  77.  */
  78. #ifdef VARIABLE_MACROS
  79.   #define _fRep (somThis->fRep)
  80. #endif
  81.  
  82.  
  83. /*
  84.  * Trace/Debug macro
  85.  */
  86. #ifndef FW_OFileMethodDebug
  87. #define FW_OFileMethodDebug(c,m) SOMMethodDebug(c,m)
  88. #endif
  89.  
  90. /*
  91.  * -- Method Macros for use in Method Procedures
  92.  */
  93. #ifdef METHOD_MACROS
  94.   #define _Acquire somSelf->Acquire
  95.   #define _Release somSelf->Release
  96.   #define _GetRefCount somSelf->GetRefCount
  97.   #define _somInit somSelf->somInit
  98.   #define _somUninit somSelf->somUninit
  99.   #define _somInit somSelf->somInit
  100.   #define _somUninit somSelf->somUninit
  101.   #define _somDuplicateReference somSelf->somDuplicateReference
  102.   #define _somCompareReference somSelf->somCompareReference
  103.   #define _somRelease somSelf->somRelease
  104.   #define _somFree somSelf->somFree
  105.   #define _somCanDelete somSelf->somCanDelete
  106.   #define _somGetClass somSelf->somGetClass
  107.   #define _somGetClassName somSelf->somGetClassName
  108.   #define _somGetSize somSelf->somGetSize
  109.   #define _somIsA somSelf->somIsA
  110.   #define _somRespondsTo somSelf->somRespondsTo
  111.   #define _somIsInstanceOf somSelf->somIsInstanceOf
  112.   #define _somDispatch somSelf->somDispatch
  113.   #define _somClassDispatch somSelf->somClassDispatch
  114.   #define _somCastObj somSelf->somCastObj
  115.   #define _somResetObj somSelf->somResetObj
  116.   #define _somPrintSelf somSelf->somPrintSelf
  117.   #define _somDumpSelf somSelf->somDumpSelf
  118.   #define _somDumpSelfInt somSelf->somDumpSelfInt
  119.   #define _InitWithExclusiveAccess somSelf->InitWithExclusiveAccess
  120.   #define _InitWithPermissions somSelf->InitWithPermissions
  121.   #define _Read somSelf->Read
  122.   #define _Write somSelf->Write
  123.   #define _GetLength somSelf->GetLength
  124.   #define _SetLength somSelf->SetLength
  125.   #define _GetPosition somSelf->GetPosition
  126.   #define _SetPosition somSelf->SetPosition
  127.   #define _BytesToEndOfFile somSelf->BytesToEndOfFile
  128.   #define _GetPermissions somSelf->GetPermissions
  129.   #define _GetFileSpecification somSelf->GetFileSpecification
  130.   #define _GetFileHandle somSelf->GetFileHandle
  131.   #define _IsEqual somSelf->IsEqual
  132.   #define _somInit somSelf->somInit
  133.   #define _somUninit somSelf->somUninit
  134. #endif
  135.  
  136.  
  137. /*
  138.  * Introduced methods
  139.  */
  140.  
  141. /* New Method: InitWithExclusiveAccess */
  142. SOM_Scope void  SOMLINK FW_OFile__InitWithExclusiveAccess(FW_OFile *somSelf, Environment *ev,
  143.         FW_OFileSpecification* fileSpecification,
  144.         FW_Boolean allowCreate);
  145.  
  146. /* New Method: InitWithPermissions */
  147. SOM_Scope void  SOMLINK FW_OFile__InitWithPermissions(FW_OFile *somSelf, Environment *ev,
  148.         FW_OFileSpecification* fileSpecification,
  149.         FW_SAccessPermission* permission,
  150.         FW_Boolean allowCreate);
  151.  
  152. /* New Method: Read */
  153. SOM_Scope void  SOMLINK FW_OFile__Read(FW_OFile *somSelf, Environment *ev,
  154.         void* destination,
  155.         long count);
  156.  
  157. /* New Method: Write */
  158. SOM_Scope void  SOMLINK FW_OFile__Write(FW_OFile *somSelf, Environment *ev,
  159.         void* source,
  160.         long count);
  161.  
  162. /* New Method: GetLength */
  163. SOM_Scope long  SOMLINK FW_OFile__GetLength(FW_OFile *somSelf, Environment *ev);
  164.  
  165. /* New Method: SetLength */
  166. SOM_Scope void  SOMLINK FW_OFile__SetLength(FW_OFile *somSelf, Environment *ev,
  167.         long length);
  168.  
  169. /* New Method: GetPosition */
  170. SOM_Scope long  SOMLINK FW_OFile__GetPosition(FW_OFile *somSelf, Environment *ev);
  171.  
  172. /* New Method: SetPosition */
  173. SOM_Scope void  SOMLINK FW_OFile__SetPosition(FW_OFile *somSelf, Environment *ev,
  174.         long positioningMode,
  175.         long markOffset);
  176.  
  177. /* New Method: BytesToEndOfFile */
  178. SOM_Scope long  SOMLINK FW_OFile__BytesToEndOfFile(FW_OFile *somSelf, Environment *ev);
  179.  
  180. /* New Method: GetPermissions */
  181. SOM_Scope void  SOMLINK FW_OFile__GetPermissions(FW_OFile *somSelf, Environment *ev,
  182.         FW_SAccessPermission* thePerms);
  183.  
  184. /* New Method: GetFileSpecification */
  185. SOM_Scope FW_OFileSpecification*  SOMLINK FW_OFile__GetFileSpecification(FW_OFile *somSelf, Environment *ev);
  186.  
  187. /* New Method: GetFileHandle */
  188. SOM_Scope FW_PlatformFileHandle*  SOMLINK FW_OFile__GetFileHandle(FW_OFile *somSelf, Environment *ev);
  189.  
  190. /* New Method: IsEqual */
  191. SOM_Scope FW_Boolean  SOMLINK FW_OFile__IsEqual(FW_OFile *somSelf, Environment *ev,
  192.         FW_OFile* theOtherFile);
  193.  
  194. /*
  195.  * Overridden methods
  196.  */
  197.  
  198. /* Overridden method: somInit */
  199. SOM_Scope void  SOMLINK FW_OFile__somInit(FW_OFile *somSelf);
  200. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_OFile_somInit)(FW_OFile *somSelf);
  201. inline void  SOMLINK FW_OFile_parent_FW_ORefCount_somInit(FW_OFile *somSelf)
  202. {
  203.   (void)         (somSelf);
  204. }
  205. #define FW_OFile_parents_somInit(arg0) \
  206.   (void) FW_OFile_parent_FW_ORefCount_somInit(arg0)
  207.  
  208. /* Overridden method: somUninit */
  209. SOM_Scope void  SOMLINK FW_OFile__somUninit(FW_OFile *somSelf);
  210. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_OFile_somUninit)(FW_OFile *somSelf);
  211. inline void  SOMLINK FW_OFile_parent_FW_ORefCount_somUninit(FW_OFile *somSelf)
  212. {
  213.   (void)         (somSelf);
  214. }
  215. #define FW_OFile_parents_somUninit(arg0) \
  216.   (void) FW_OFile_parent_FW_ORefCount_somUninit(arg0)
  217.  
  218. /*
  219.  * -- Primary Implementation File Support
  220.  */
  221. #if (defined(FW_OFile_Class_Source) || defined(SOM_Module_slfilrep_Source))
  222.  
  223. /*
  224.  * -- The FW_OFile ClassData Structure
  225.  */
  226.  
  227. #if PRAGMA_IMPORT_SUPPORTED
  228. #pragma export list FW_OFileClassData
  229. #endif
  230.  
  231.  
  232. /*
  233.  * -- The FW_OFile Class Ancestor Table
  234.  */
  235. static somClassDataStructure * SOMDLINK FW_OFileClassAncestors [] = {
  236.     (somClassDataStructure*) & FW_ORefCountClassData,    /* parent */
  237.     (somClassDataStructure*) & SOMObjectClassData,    /* ancestor */
  238. };
  239.  
  240.  
  241. /*
  242.  * -- The FW_OFile Override ProcPtr Implementations Table
  243.  */
  244. static somMethodPtr FW_OFileOverrideProcs [] = {
  245.     (somMethodPtr) FW_OFile__somInit,    /* override class SOMObject */
  246.     (somMethodPtr) FW_OFile__somUninit,    /* override class SOMObject */
  247. };
  248.  
  249.  
  250. static void FW_OFileDLLD ( void ) { }
  251.  
  252.  
  253. /*
  254.  * -- The FW_OFile Static Class Info Master Table
  255.  */
  256. static somStaticClassInfo FW_OFileSCI = {
  257.       70,    /* layout version */
  258.     (somClassDataStructure*)  & FW_OFileClassData,    /* main token table */
  259.       FW_OFileOverrideProcs,    /* override proc implemenations table */
  260.       FW_OFileClassAncestors,    /* ancestor table */
  261.       FW_OFileDLLD,    /* DLLdesignator */
  262.       0,    /* no special procs */
  263.       0,    /* rtci slot */
  264.       0,    /* count slot */
  265.       0,    /* dynamic ancestry */
  266.       0,    /* free */
  267.       0,    /* free */
  268.       0,    /* free */
  269.       0,    /* free */
  270.  
  271. /*
  272.  * -- The FW_OFile Counts Table
  273.  */
  274.     (somStaticClassCounts *)
  275.         "\x00\x00\x00\x01"    /* majorversion */
  276.         "\x00\x00\x00\x00"    /* minorversion */
  277.         "\x00\x00\x00\x01"    /* flags */
  278.             "\x00\x02"    /* type code alignment */
  279.             "\x00\x0f"    /* classTokenCount */
  280.             "\x00\x01"    /* numDirectParents */
  281.             "\x00\x00"    /* numMetaClasses */
  282.             "\x00\x01"    /* numOverriddenAncestors */
  283.             "\x00\x00"    /* numMigratedMethods */
  284.             "\x00\x00"    /* numSelectedInherited */
  285.             "\x00\x00"    /* numUnused */
  286.             "\x00\x00"    /* free */
  287.             "\x00\x00"    /* free */
  288.             "\x00\x00"    /* free */
  289.             "\x00"    /* free */
  290.                 ,
  291.  
  292.     {
  293.       "FW_OFile",    /* the class name */
  294.       sizeof (FW_OFileData), /* class instance data size */
  295.  
  296. /*
  297.  * -- The FW_OFile Parent Versions Table
  298.  */
  299.     (somParentVersions *)
  300.         "\x00\x00\x00\x01"    /* majorversion */
  301.         "\x00\x00\x00\x00"    /* minorversion */
  302.                 ,
  303.  
  304.  
  305. /*
  306.  * -- The FW_OFile Token Slot Usage Table
  307.  */
  308.     (somSlotUsage *)
  309.         "\x33\x00\x00\x00\x00\x00\x00",
  310.  
  311.  
  312. /*
  313.  * -- The FW_OFile Method Signature Info
  314.  */
  315.     (somSignatureInfo *)
  316.         "\x04\x17\xcc\x00"    /* InitWithExclusiveAccess */
  317.          "\x05\x17\xcc\xc0"    /* InitWithPermissions */
  318.          "\x04\x07"    /* Read */
  319.          "\x04\x07"    /* Write */
  320.          "\x02\x05"    /* GetLength */
  321.          "\x03\x07"    /* SetLength */
  322.          "\x02\x05"    /* GetPosition */
  323.          "\x04\x07"    /* SetPosition */
  324.          "\x02\x05"    /* BytesToEndOfFile */
  325.          "\x03\x07"    /* GetPermissions */
  326.          "\x02\x0c"    /* GetFileSpecification */
  327.          "\x02\x0c"    /* GetFileHandle */
  328.          "\x03\x00"    /* IsEqual */
  329.              ,
  330.  
  331.  
  332. /*
  333.  * -- The FW_OFile Class Method Names
  334.  */
  335.         "somInit\0"
  336.         "somUninit\0"
  337.         "InitWithExclusiveAccess\0"
  338.         "InitWithPermissions\0"
  339.         "Read\0"
  340.         "Write\0"
  341.         "GetLength\0"
  342.         "SetLength\0"
  343.         "GetPosition\0"
  344.         "SetPosition\0"
  345.         "BytesToEndOfFile\0"
  346.         "GetPermissions\0"
  347.         "GetFileSpecification\0"
  348.         "GetFileHandle\0"
  349.         "IsEqual\0"
  350.             ,
  351.  
  352.  
  353. /*
  354.  * -- The FW_OFile Override Slots Table
  355.  */
  356.     (somOverrideData *)
  357.         "\x00\x01\x00\x02"    /* parent SOMObject has 2 overrides */
  358.             "\x00\x00"    /* somInit */
  359.             "\x00\x01"    /* somUninit */
  360.                 ,
  361.  
  362.       0,    /* no migrated methods table */
  363.       0,    /* no selected inherited */
  364.       0,    /* unused */
  365.  
  366.       0,    /* free */
  367.       0,    /* free */
  368.       0,    /* free */
  369.       0,    /* free */
  370.     },
  371. };
  372.  
  373. /*
  374.  * -- The FW_OFile ClassData Structure
  375.  */
  376. struct FW_OFileClassDataStructure SOMDLINK FW_OFileClassData = {
  377.       0,            /* zero */
  378.     & FW_OFileSCI,        /* SCI link */
  379.       0,            /* instanceDataToken */
  380.       0,            /* reserved */
  381.       0,            /* reserved */
  382.       0,            /* reserved */
  383.     (somMToken) 0,        /* somInit:empty */
  384.     (somMToken) 0,        /* somUninit:empty */
  385.     (somMToken) FW_OFile__InitWithExclusiveAccess,    /* InitWithExclusiveAccess:method */
  386.     (somMToken) FW_OFile__InitWithPermissions,    /* InitWithPermissions:method */
  387.     (somMToken) FW_OFile__Read,    /* Read:method */
  388.     (somMToken) FW_OFile__Write,    /* Write:method */
  389.     (somMToken) FW_OFile__GetLength,    /* GetLength:method */
  390.     (somMToken) FW_OFile__SetLength,    /* SetLength:method */
  391.     (somMToken) FW_OFile__GetPosition,    /* GetPosition:method */
  392.     (somMToken) FW_OFile__SetPosition,    /* SetPosition:method */
  393.     (somMToken) FW_OFile__BytesToEndOfFile,    /* BytesToEndOfFile:method */
  394.     (somMToken) FW_OFile__GetPermissions,    /* GetPermissions:method */
  395.     (somMToken) FW_OFile__GetFileSpecification,    /* GetFileSpecification:method */
  396.     (somMToken) FW_OFile__GetFileHandle,    /* GetFileHandle:method */
  397.     (somMToken) FW_OFile__IsEqual,    /* IsEqual:method */
  398. };
  399.  
  400.  
  401. /*
  402.  * Functions for attributes.
  403.  */
  404.  
  405. /*
  406.  * Macros for initializers/destructors
  407.  */
  408.  
  409. #endif /* Primary Implementation Support */
  410.  
  411. #endif       /* SOM_FW_OFile_xih */
  412.